//
//  CouponViewController.m
//  WWXELuShang
//
//  Created by 王涛 on 15/12/25.
//  Copyright © 2015年 lanou. All rights reserved.
//

#import "CouponViewController.h"

@interface CouponViewController ()

@end

@implementation CouponViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = kBackGroundColor;
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"关闭" style:(UIBarButtonItemStylePlain) target:self action:@selector(back)];
    self.title = @"优惠券";
    self.navigationItem.leftBarButtonItem.tintColor = [UIColor whiteColor];
    [self setScrollView];
    // Do any additional setup after loading the view.
}
- (void)back {
    [self.navigationController popToRootViewControllerAnimated:YES];
}
- (void)setScrollView {
    UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:[UIScreen mainScreen].bounds];
    scrollView.contentSize = CGSizeMake(kWidth, kHeight + 5 );
    scrollView.scrollEnabled = YES;
    UILabel *label = [[UILabel alloc] initWithFrame:(CGRectMake(kWidth / 5, kHeight / 14 + kHeight / 5, kWidth - kWidth / 5 * 2, 25))];
    label.text = @"暂无优惠券";
    label.textAlignment = NSTextAlignmentCenter;
    label.textColor = [UIColor lightGrayColor];
    UIImageView *image = [[UIImageView alloc] initWithFrame:(CGRectMake(kWidth / 5, kHeight / 14, kWidth - kWidth / 5 * 2, kHeight / 5))];
    image.image = [UIImage imageNamed:@"coupon.png"];
    [scrollView addSubview:image];

    [scrollView addSubview:label];
    [self.view addSubview:scrollView];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
